var webpack = require('webpack'),
  webpackMutiConfig = require('../utils/webpack-config'),
  webpackConfig = webpackMutiConfig('production');

var html = require('./_html'),
  css = require('./_css'),
  clean = require('./_del');

// {命令名} --help  显示提示信息
exports.usage = '生成发布初期代码';
exports.run = function(options) {
  clean(function() {
    webpack(webpackConfig, function() {
      //console.log('js Compile end');
      html();
      css(true);
    });
  });

};

//1.遍历html文件里面的路径文件，找到静态资源；
//2.发布cdn；
//3.替换html文件里面的相应静态资源；
